// app.js
App({
  onLaunch() {
    // 展示本地存储能力
    const logs = wx.getStorageSync('logs') || []
    logs.unshift(Date.now())
    wx.setStorageSync('logs', logs)

    // 登录
    wx.login({
      success: res => {
        // 发送 res.code 到后台换取 openId, sessionKey, unionId
      }
    })
  },
  //切换背景
  change_bg:function(){
    if(this.globalData.isChange){
      this.globalData.bg_img='container_box2',
      this.globalData.isChange=0
    }else{
      this.globalData.bg_img='container_box',
      this.globalData.isChange=1
    }
  },
  
  globalData: {
    userInfo:{"userName":"","userImg":""},
    i:0,
    bg_img:'container_box',
    isChange:1,
    arr2:[],
    arr:[],
    url:'http://49.233.35.127/admin/singer',
    data:{Sex:'',Class:''},
    datalist:[],
    dalist:[],
    hotlist:[],
    Name:'',
    Sex:'',
    Class:''
  }
})
